
/**
 * This is the main entrance for the swarm program.
 */

#include <swarm.h>

int main(int argc, char **argv){

  /* Init the library. */
  sw_init(&argc, &argv);

  /* First print the library info. */
  sw_print_lib_info();

  sw_swarm *sw = sw_load_swarm(argv[1]);
  if (!sw){
    printf("Error loading swarm file: %s\n", argv[1]);
    return 1;
  }

  sw_init_display(&argc, &argv, sw->size.x, sw->size.y);
  sw_start_display();

  _sw_set_internal(sw);

  sw_simulate();

  //for (;;);

  return 0;

}
